3.2.10 \(\int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx\) [110]

Optimal. Leaf size=63 \[ -\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f} \]

[Out]

-2*d*ln(cosh(1/2*e+1/4*I*Pi+1/2*f*x))/a/f^2+(d*x+c)*tanh(1/2*e+1/4*I*Pi+1/2*f*x)/a/f

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3399, 4269, 3556} \begin {gather*} \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{a f}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )\right )}{a f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(a + I*a*Sinh[e + f*x]),x]

[Out]

(-2*d*Log[Cosh[e/2 + (I/4)*Pi + (f*x)/2]])/(a*f^2) + ((c + d*x)*Tanh[e/2 + (I/4)*Pi + (f*x)/2])/(a*f)

Rule 3399

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx &=\frac {\int (c+d x) \csc ^2\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right ) \, dx}{2 a}\\ &=\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}-\frac {d \int \coth \left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(185\) vs. \(2(63)=126\).
time = 0.31, size = 185, normalized size = 2.94 \begin {gather*} \frac {i d f x \cosh \left (e+\frac {f x}{2}\right )+\cosh \left (\frac {f x}{2}\right ) \left (-2 i d \text {ArcTan}\left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right )-d \log (\cosh (e+f x))\right )+2 c f \sinh \left (\frac {f x}{2}\right )+d f x \sinh \left (\frac {f x}{2}\right )+2 d \text {ArcTan}\left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right ) \sinh \left (e+\frac {f x}{2}\right )-i d \log (\cosh (e+f x)) \sinh \left (e+\frac {f x}{2}\right )}{a f^2 \left (\cosh \left (\frac {e}{2}\right )+i \sinh \left (\frac {e}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (e+f x)\right )+i \sinh \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(a + I*a*Sinh[e + f*x]),x]

[Out]

(I*d*f*x*Cosh[e + (f*x)/2] + Cosh[(f*x)/2]*((-2*I)*d*ArcTan[Sech[e + (f*x)/2]*Sinh[(f*x)/2]] - d*Log[Cosh[e +
f*x]]) + 2*c*f*Sinh[(f*x)/2] + d*f*x*Sinh[(f*x)/2] + 2*d*ArcTan[Sech[e + (f*x)/2]*Sinh[(f*x)/2]]*Sinh[e + (f*x
)/2] - I*d*Log[Cosh[e + f*x]]*Sinh[e + (f*x)/2])/(a*f^2*(Cosh[e/2] + I*Sinh[e/2])*(Cosh[(e + f*x)/2] + I*Sinh[
(e + f*x)/2]))

________________________________________________________________________________________

Maple [A]
time = 0.80, size = 66, normalized size = 1.05

method result size
risch \(\frac {2 d x}{a f}+\frac {2 d e}{a \,f^{2}}+\frac {2 i \left (d x +c \right )}{f a \left ({\mathrm e}^{f x +e}-i\right )}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}-i\right )}{a \,f^{2}}\) \(66\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(a+I*a*sinh(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

2*d/a/f*x+2*d/a/f^2*e+2*I*(d*x+c)/f/a/(exp(f*x+e)-I)-2*d/a/f^2*ln(exp(f*x+e)-I)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 80, normalized size = 1.27 \begin {gather*} 2 \, d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} - i \, a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} - i\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} - \frac {2 \, c}{{\left (i \, a e^{\left (-f x - e\right )} - a\right )} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="maxima")

[Out]

2*d*(x*e^(f*x + e)/(a*f*e^(f*x + e) - I*a*f) - log((e^(f*x + e) - I)*e^(-e))/(a*f^2)) - 2*c/((I*a*e^(-f*x - e)
 - a)*f)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 64, normalized size = 1.02 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (f x + e\right )} + i \, c f - {\left (d e^{\left (f x + e\right )} - i \, d\right )} \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="fricas")

[Out]

2*(d*f*x*e^(f*x + e) + I*c*f - (d*e^(f*x + e) - I*d)*log(e^(f*x + e) - I))/(a*f^2*e^(f*x + e) - I*a*f^2)

________________________________________________________________________________________

Sympy [A]
time = 0.13, size = 56, normalized size = 0.89 \begin {gather*} \frac {2 i c + 2 i d x}{a f e^{e} e^{f x} - i a f} + \frac {2 d x}{a f} - \frac {2 d \log {\left (e^{f x} - i e^{- e} \right )}}{a f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x)

[Out]

(2*I*c + 2*I*d*x)/(a*f*exp(e)*exp(f*x) - I*a*f) + 2*d*x/(a*f) - 2*d*log(exp(f*x) - I*exp(-e))/(a*f**2)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 67, normalized size = 1.06 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (f x + e\right )} - d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + i \, c f + i \, d \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="giac")

[Out]

2*(d*f*x*e^(f*x + e) - d*e^(f*x + e)*log(e^(f*x + e) - I) + I*c*f + I*d*log(e^(f*x + e) - I))/(a*f^2*e^(f*x +
e) - I*a*f^2)

________________________________________________________________________________________

Mupad [B]
time = 0.34, size = 56, normalized size = 0.89 \begin {gather*} \frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e+f\,x}-\mathrm {i}\right )}+\frac {2\,d\,x}{a\,f}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )}{a\,f^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(a + a*sinh(e + f*x)*1i),x)

[Out]

((c + d*x)*2i)/(a*f*(exp(e + f*x) - 1i)) + (2*d*x)/(a*f) - (2*d*log(exp(f*x)*exp(e) - 1i))/(a*f^2)

________________________________________________________________________________________